package com.ies.ieschool.client.module.academic.view.content;

import com.ies.ieschool.client.module.academic.view.data.SubjectSessionData;
import com.smartgwt.client.data.DataSource;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.SelectItem;
import com.smartgwt.client.widgets.grid.ListGridField;

public class DropDownSessionView extends DynamicForm {
	
	public DropDownSessionView(){
	DataSource SubjectSessionDS = SubjectSessionData.getInstance();
	  
	  
	ListGridField sessionName = new ListGridField("sessionName");
    ListGridField teacherName = new ListGridField("teacherName");
    
	  
    SelectItem item = new SelectItem();
    item.setWidth(240);
    item.setTitle("เลือก");
    item.setOptionDataSource(SubjectSessionDS);
    //item.setValueField("SKU");
    //item.setDisplayField("itemName");
    item.setPickListWidth(450);
    item.setPickListFields(sessionName, teacherName);

    this.setItems(item);
	}

}
